
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreIntegralRequest struct {

	Image string `json:"image" form:"image"`

	ProductId string `json:"product_id" form:"product_id"`

	Images string `json:"images" form:"images"`

	Title string `json:"title" form:"title"`

	Price string `json:"price" form:"price"`

	Sort string `json:"sort" form:"sort"`

	Sales string `json:"sales" form:"sales"`

	UnitName string `json:"unit_name" form:"unit_name"`

	Stock string `json:"stock" form:"stock"`

	AddTime string `json:"add_time" form:"add_time"`

	IsHost string `json:"is_host" form:"is_host"`

	IsShow string `json:"is_show" form:"is_show"`

	IsDel string `json:"is_del" form:"is_del"`

	Num string `json:"num" form:"num"`

	Quota string `json:"quota" form:"quota"`

	OnceNum string `json:"once_num" form:"once_num"`

	QuotaShow string `json:"quota_show" form:"quota_show"`

}

func (r *StoreIntegralRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreIntegralRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"image": "required",

		"product_id": "required",

		"images": "required",

		"title": "required",

		"price": "required",

		"sort": "required",

		"sales": "required",

		"unit_name": "required",

		"stock": "required",

		"add_time": "required",

		"is_host": "required",

		"is_show": "required",

		"is_del": "required",

		"num": "required",

		"quota": "required",

		"once_num": "required",

		"quota_show": "required",

	}
}

func (r *StoreIntegralRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreIntegralRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreIntegralRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
